import { defineComponent, ref } from "vue";
import style from "./index.module.less";
import { popupCheckProps } from "./types";
import RowView from "../RowView";
import { Divider, Checkbox } from "vant";
import IconText from "../IconText";
export default defineComponent({
  name: "",
  props: popupCheckProps,
  setup(_) {
    return () => {
      const getData = () => {
        return _.data.map((e) => {
          return e;
        });
      };
      return (
        <div class="w-full max-h-[400px] overflow-y-scroll no-scrollbar">
          {getData().map((e) => {
            return (
              <div class="mx-[14px]">
                <RowView class="justify-between h-[60px] ">
                  <IconText
                    url={e.logo}
                    text={e.userName}
                    class="popup-check"
                    iconSize={41}
                  />
                  {e.right ? e.right() : <Checkbox v-model={e.isCheck} />}
                </RowView>
                <Divider class="!mt-[0px] !mb-[0px]" />
              </div>
            );
          })}
        </div>
      );
    };
  },
});
